<% layout("../../includes/layout-list-v2") -%>


<div class="box-body">
	<div class="box box-info searchField">
		<form id="form" class="form-submission-search backend"
			title="<%-controller%>" action='' method='post'>
			<br />
			<div class="row">
				<div class="col-lg-3">
					<div class="input-group">
						<span class="input-group-addon">Company</span> <input
							name="company.name" value="<%-record['company.name'] -%>"
							type="text" class="form-control">
					</div>
					<!-- /input-group -->
				</div>
				<!-- /.col-lg-2 -->
				<div class="col-lg-3">
					<div class="input-group">
						<span class="input-group-addon"> Branch </span> <input
							name="branch.name" value="<%-record['branch.name'] -%>"
							type="text" class="form-control">
					</div>
					<!-- /input-group -->
				</div>
				<!-- /.col-lg-2 -->
				<div class="col-lg-3">
					<div class="input-group">
						<span class="input-group-addon"> Username </span> <input
							name="username" value="<%-record['username'] -%>" type="text"
							class="form-control">
					</div>
					<!-- /input-group -->
				</div>
				<!-- /.col-lg-2 -->

				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<input class="btn btn-default " type="submit" value="Search" />
			</div>
			<!-- /.row -->
			<br />
		</form>
	</div>
</div>

<table class="table table-bordered">
	<tr>
		<th>Company</th>
		<th>Branch</th>
		<th>Position</th>
		<th>Username</th>
		<th>Date Added</th>
		<th width="120px">Action (<%- HAS_ROLE('has_admin_role')%>)</th>
	<tr>
		</th>
	</tr>
	<% if(records.length){ for(var i = 0;i < records.length;i++) { %>
	<tr>
		<td><%=records[i].company_name%></td>
		<td><%=records[i].branch_name%></td>
		<td><%=records[i].user_group_name%></td>
		<td><%=records[i].username%></td>
		<td><%=records[i].date_added%></td>
		<td><% include ../../includes/actions %></td>
	</tr>
	<% } }else{ %>
	<tr>
		<td colspan="6">No User</td>
	</tr>
	<% } %>


</table>

<script type="text/javascript">
	$(".page-content-header").html('<%- contentHeader %>');
</script>